SRC_ROOT_DIR=$(shell pwd)

All:
	@cd $(SRC_ROOT_DIR)/compile_server && make
	@cd $(SRC_ROOT_DIR)/oj_server      && make

.PHONY:public
public:
	@mkdir -p public/compile_server/temp    public/oj_server
	cp     -r compile_server/compile_server public/compile_server
	cp     -r oj_server/oj_server           public/oj_server
	cp     -r oj_server/conf                public/oj_server
	cp     -r oj_server/questions_all       public/oj_server
	cp     -r oj_server/template_html       public/oj_server
	cp     -r oj_server/wwwroot             public/oj_server

.PHONY:clean
clean:
	@cd     $(SRC_ROOT_DIR)/compile_server && make clean
	@cd     $(SRC_ROOT_DIR)/oj_server      && make clean 
	rm  -rf $(SRC_ROOT_DIR)/public
